#include <functional>
#include <memory>
#include <string>
#include "rclcpp/rclcpp.hpp"
#include "node/lifecycle_talker.hpp"
#include "node/basic_cmd.hpp"
#include "status.h"

int main(int argc, char **argv)
{
    setvbuf(stdout, NULL, _IONBF, BUFSIZ);

    rclcpp::init(argc, argv);

    rclcpp::executors::SingleThreadedExecutor exe;

    std::shared_ptr<LifecycleTalker> lc_talker = std::make_shared<LifecycleTalker>("lc_talker");
    std::shared_ptr<BasicCmd> basic_cmd = std::make_shared<BasicCmd>("basic_cmd");
    basic_cmd->auto_check(CheckType::CHECK_TO_START);

    exe.add_node(lc_talker->get_node_base_interface());
    exe.add_node(basic_cmd->get_node_base_interface());

    exe.spin();

    rclcpp::shutdown();

    return 0;
}